﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CJJCH.Web
{
    public partial class ApplicationProcedures : System.Web.UI.Page
    {
        CJJCH.BLL.T_NET_Note bll_note = new CJJCH.BLL.T_NET_Note();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitRepater();
                DataBinds();
            }
        }
        private void InitRepater()
        {
            if (Request.QueryString["firstid"] != null && LTP.Common.CheckInput.CheckDigit(Request.QueryString["firstid"].Trim()))
            {
                lblFID.Text = Request.QueryString["firstid"].ToString();
                top.IIndex = Convert.ToInt32(lblFID.Text);
                top.FirstId = Convert.ToInt32(lblFID.Text);

            }
            else
            {
                Response.Redirect("error.aspx");
            }
            if (Request.QueryString["secondid"] != null && LTP.Common.CheckInput.CheckDigit(Request.QueryString["firstid"].Trim()))
            {
                lblSID.Text = Request.QueryString["secondid"].ToString();
                top.SecondId = Convert.ToInt32(lblSID.Text);
            }
            else
            {
                Response.Redirect("error.aspx");
            }
            if (Request.QueryString["thirdid"] != null && LTP.Common.CheckInput.CheckDigit(Request.QueryString["firstid"].Trim()))
            {
                top.ThirdId = Convert.ToInt32(Request.QueryString["thirdid"]);
            }

            if (Request.QueryString["keyword"] != null)
            {
                lblKeyWord.Text = Request.QueryString["keyword"].ToString();
                top.Keyword = lblKeyWord.Text;

            }
            if (Request.QueryString["typename"] != null)
            {

                lbltypeName.Text = Request.QueryString["typeName"].Trim();
                top.Typename = lbltypeName.Text;

            }

        }
        private void DataBinds()
        {
            IList<CJJCH.Model.T_NET_Note> list = new List<CJJCH.Model.T_NET_Note>();
            list = bll_note.GetList(4);
            if (list.Count == 6)
            {
                this.lblTitle1.Text = "申报立项";
                this.lblNote1.Text = list[0].DataNote;
                this.lblTitle2.Text = "标准起草及征求意见";
                this.lblNote2.Text = list[1].DataNote;
                this.lblTitle3.Text = "标准审查";
                this.lblNote3.Text = list[2].DataNote;
                this.lblTitle4.Text = "审批发布及备案";
                this.lblNote4.Text = list[3].DataNote;
                this.lblTitle5.Text = "标准出版印刷";
                this.lblNote5.Text = list[4].DataNote;
                this.lblTitle6.Text = "标准复审";
                this.lblNote6.Text = list[5].DataNote;
            }
            else
            {
                LTP.Common.WindowClass.WindowBack("操作错误！");
            }
        }
    }
}